//
//  UILabel+Frame.m
//
//  Created by zhaol on 10/26/15.
//  Copyright © 2015 zify. All rights reserved.
//

#import "UILabel+Frame.h"

#import "NSString+Font.h"
#import "UIView+Layout.h"

@implementation UILabel (Frame)

- (void)resetHeightForSelfWidth
{
    self.height = [self.text ZL_sizeWithFont:self.font forWidth:self.width].height;
}

- (void)resetSizeForSelfWidth
{
    self.size = [self.text ZL_sizeWithFont:self.font forWidth:self.width];
}

- (void)resetSize
{
    self.size = [self.text ZL_sizeWithFont:self.font];
}

- (void)resetHeight
{
    self.height = [self.text ZL_sizeWithFont:self.font].height;
}

- (void)resetWidth
{
    self.width = [self.text ZL_sizeWithFont:self.font].width;
}

@end
